<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"></meta>
    <title>差旅表</title>
    <meta HTTP-EQUIV="Pragma" CONTENT="no-cache"></meta>
    <meta HTTP-EQUIV="Cache-Control" CONTENT="no-cache"></meta>
    <meta HTTP-EQUIV="Expires" CONTENT="0"></meta>
    <link rel="stylesheet" th:href="@{/static/layui/css/layui.css}" media="all"></link>
    <link rel="stylesheet" th:href="@{/static/layui/css/modules/laydate.css}" media="all"></link>
</head>
<body >

<div style="width: 60%; margin: 0 auto; border: 1px solid  #E6E6E6; padding: 20px; position: relative">


    <div style="position: absolute; right: 50px; bottom: 50px;z-index: 9999">
        <img  th:src= "@{/static/images/{path}.jpg(path=${travel.result}?${travel.result}:'running')}"/>
    </div>

    <form class="layui-form layui-form-pane" th:action="@{/travel/process/complete}">
        <div class="layui-form-item">
            <label class="layui-form-label">标题</label>
            <div class="layui-input-block">
                <input type="text" class="layui-input userName" readonly="readonly" th:value="${travel.title}"/>
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">姓名</label>
                <div class="layui-input-block">
                    <input type="text" class="layui-input userName" readonly="readonly" th:value="${travel.uname}"/>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">部门</label>
                <div class="layui-input-inline">
                    <input type="text" readonly="readonly" class="layui-input" th:value="${travel.dname}"/>
                </div>
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">开始日期</label>
                <div class="layui-input-block">
                    <input type="text" class="layui-input" id="test1" disabled="disabled" readonly="readonly"
                           th:value="${#dates.format(travel.sdate, 'yyyy-MM-dd')}"/>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">结束日期</label>
                <div class="layui-input-inline">
                    <input type="text" class="layui-input" readonly="readonly" name="edate"
                           th:value="${#dates.format(travel.edate,'yyyy-MM-dd')}"/>
                </div>
            </div>
        </div>


        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">交通工具</label>
                <div class="layui-input-block">
                    <input type="text" th:value="${travel.traffic}" readonly="readonly" class="layui-input"/>
                </div>
            </div>

        </div>


        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">出发地</label>
                <div class="layui-input-block">
                    <input type="text" th:value="${travel.startoff}" readonly="readonly" class="layui-input"/>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">目的地</label>
                <div class="layui-input-inline">
                    <input type="text" th:value="${travel.arrived}" readonly="readonly" class="layui-input"/>
                </div>
            </div>
        </div>


        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">借款金额</label>
                <div class="layui-input-inline">
                    <input type="text" name="borrow" autocomplete="off"  th:value="${travel.borrow}" readonly="readonly" class="layui-input"/>
                </div>

            </div>
        </div>


        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">差旅原因</label>
            <div class="layui-input-block">
                <textarea th:value="${travel.reason}" th:text="${travel.reason}" name="reason" class="layui-textarea"
                          readonly="readonly"></textarea>
            </div>
        </div>


        <div class="layui-form-item" th:each="comment:${comments}">
            <div class="layui-inline">
                <label class="layui-form-label" th:text="${comment.name}"></label>
                <div class="layui-input-inline">
                    <input type="text" autocomplete="off" th:value="${comment.content}" class="layui-input"
                           readonly="readonly" style="color: green"/>
                </div>

            </div>
        </div>

    </form>

</div>
<script type="text/javascript" th:src="@{/static/layui/layui.js}"></script>
<script type="text/javascript">

    layui.use(['form', 'jquery'], function () {


    });


</script>


</body>
</html>